package com.newasia.management.dto.user.user;

import com.newasia.commons.result.AbstractRequest;
import com.newasia.commons.tool.exception.ValidateException;
import com.newasia.management.constants.ManagementRetCode;
import lombok.Data;

@Data
public class SysUserListRequset extends AbstractRequest{

    private Long roleId;
    private String userName;
    private Integer page;
    private Integer size;

    @Override
    public void requestCheck() {
        if(page==null||size==null){
            throw new ValidateException(
                    ManagementRetCode.REQUEST_CHECK_FAILURE.getCode(),
                    ManagementRetCode.REQUEST_CHECK_FAILURE.getMessage());
        }
        /*if(userName!=null&&this.sqlCheck(userName)){
            throw new ValidateException(
                    ManagementRetCode.REQUEST_CHARACTERS_ILLEGAL.getCode(),
                    ManagementRetCode.REQUEST_CHARACTERS_ILLEGAL.getMessage());
        }*/
    }
}
